#include<string>
#include<iostream>
#include<vector>

class Test {
public:
	int i = 0;

	Test(int i):i(i) {
		std::cout << "Test() " << i<< std::endl;
	}
	Test(Test&& test) {
		i = test.i;
		std::cout << "Test() move " << i << std::endl;
	}
	Test& operator=(Test&& test) {
		i = test.i;
		std::cout << "operator= move " << i << std::endl;
		return *this;
	}

	~Test() {
		std::cout << "~Test() " << i<<std::endl;
	}
};

int main() {
	{
		std::vector<Test>vec;
		std::cout << "capacity: " << vec.capacity() << std::endl;
		vec.push_back(Test(1));
		vec.push_back(Test(2));
		vec.push_back(Test(3));
		std::cout << "capacity: " << vec.capacity() << std::endl;
		vec.erase(vec.end() - 1);
	}


	////char p[] = "baidu"; 
	//char* p = new char[3];
	//p[0] = 'b'; p[1] = 'd'; p[2] = '\0';
	//int a = sizeof(p); 
	//int b = strlen(p);
	//p[2] = 't';
	int i;
	//std::cout << a << " " << b << std::endl;
	std::cin >> i;
}